package cn.tedu.review;

/**
 * @author: Dsi
 * @date: 2021/11/9 9:31
 * @description:
 */
public class TestBlock {
    public static void main(String[] args) {
        System.out.println(1);
        Apple a=new Apple();
    }
}
class Sg{
    public Sg(){
        System.out.println("父类无参构造");
    }
}
class Apple extends Sg{
    {
        System.out.println("我是构造代码块");
    }
    public Apple(int a){
        System.out.println("含参函数");
    }
    public Apple(){
        super();
        //this(45);

        {
            System.out.println("我是局部代码块");
        }
        System.out.println("无参构造");
    }
}